# encoding: utf8


f = open("interface.txt","r")
f2 = open("result.csv","w")
for line in f.readlines():
    line = line.strip()
    if not line:
        continue
    if line.startswith("#"):
        #print("此行是注释",line)
        continue
    #print("11----",line)
    arr = line.split("',")
    #print(arr[0])
    if "url" in arr[0]:
        #url = arr[0][len("url('^"):-1]
        url = arr[0].split("^")[1]
        url = url + ","
        f2.write(url)
        #print(url)
    #print(arr[1])
    if "#" in arr[1]:
        mc = arr[1].split("#")
        m = mc[0].strip()
        m = m[:-2]
        f2.write(m+",")
        print(mc[1])
        f2.write(mc[1])
    else:
        m = arr[1][:-2]
        f2.write(m+",")
    print(m)
    f2.write("\n")
f.close()
f2.close()